﻿#pragma once

#include <QWidget>
#include <Global.h>
#include "AbstractSettingsWidget.h"

namespace Ui {
class EditorSettingsWidget;
}

namespace Domy {

/**
 * @brief The EditorSettingsWidget class
 * @note  编辑器设置页面
 */
class EditorSettingsWidget : public AbstractSettingsWidget
{
    Q_OBJECT

public:
    explicit EditorSettingsWidget(QWidget *parent = nullptr);
    ~EditorSettingsWidget();

    virtual void apply() override;

    virtual void restoreDefault() override;

private slots:
    void slotOnSchemeChanged(const QString &name);
    void slotOnItemSelectionChanged();
    void slotOnCopyBtnClicked();
    void slotOnDelBtnClicked();
    void slotOnNewSchemeName(const QString &name);
    void slotOnSchemeParamChanged();
    void slotOnBackgroundColorChanged(const QColor &color);

private:
    void initSettings();

private:
    Ui::EditorSettingsWidget *m_ui;
};

} // namespace Domy
